/**
 * Created by zhangqingxi on 2017-03-31.
 */

var modelPath=ROOT_PATH+'/environmental/abnormalDischarge/monthlyReport/';

/**
 * 加载表格
 *
 */
function  loadDataList() {

    $('#dataList').datagrid({
        url:modelPath+'findByParam.shtml',
        queryParams:{
            sort:'d.years,months',
            order:'desc'
        },
        // idField:'id',
        fitColumns:true,
        pagination:true,
        rownumbers:true,
        singleSelect:true,
        sortOrder:true,
        striped:true,
        fit:true,
        columns:[[
            {field:'years',title:'年度',width:10},
            {field:'months',title:'月度',width:10},
            {field:'deptName',title:'部门名称',width:10},
            {field:'wasteTypeName',title:'废物类别',width:10},
            {field:'emissionFateName',title:'排放去向',width:10},
            {field:'dischargeNumber',title:'排放量',width:10}

        ]],
        toolbar: '#toolbar'

    });


}

$(function () {
    loadDataList();

    //查询按钮事件
    initSearchClick('d.years,months');

    //重置参数
    initResetClick();

    initYears();
    initMonths()

});

